Remove redundant closure
authormcarton <cartonmartin+git@gmail.com>
Fri, 15 Jan 2016 14:51:27 +0000 (15:51 +0100)
committermcarton <cartonmartin+git@gmail.com>
Sat, 16 Jan 2016 11:42:56 +0000 (12:42 +0100)
Fix all Clippy’s redundant_closure warnings.

src/cargo/util/graph.rs

index 53a2b9c5ac7a4a139619433671ed2b82b338b42e..c6e5024ced8ea354bfc0705669f09da848e47538 100644 (file)
@@ -25,7 +25,7 @@ impl<N: Eq + Hash + Clone> Graph<N> {
     }
 
     pub fn link(&mut self, node: N, child: N) {
-        self.nodes.entry(node).or_insert_with(|| HashSet::new()).insert(child);
+        self.nodes.entry(node).or_insert_with(HashSet::new).insert(child);
     }
 
     pub fn get_nodes(&self) -> &HashMap<N, HashSet<N>> {